package com.jzo2o.customer.controller.worker;


import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpUtil;
import com.jzo2o.common.expcetions.ForbiddenOperationException;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.ICertificationService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


@RestController("workerCertificationController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 提交认证相关接口")
public class CertificationController {

    @Resource
    private ICertificationService iCertificationService;


    /**
     * 服务端提交认证申请
     * @param auditReqDTO
     */
    @PostMapping
    public void audit(@RequestBody WorkerCertificationAuditAddReqDTO auditReqDTO) {
        iCertificationService.addCertificationAudit(auditReqDTO);
    }

    @GetMapping("rejectReason")
    public RejectReasonResDTO getRejectReason() {
        return iCertificationService.getRejectReason();
    }




}
